Skip to content

Remove redundant freeze#6214

Merged
jeffwidman merged 1 commit intomainfrom
no-freeze-in-pub
Nov 28, 2022
Merged

Remove redundant freeze#6214
jeffwidman merged 1 commit intomainfrom
no-freeze-in-pub

Conversation

@jeffwidman
Copy link
Copy Markdown
Member

Rubocop was complaining about this in an unrelated PR, so split it out to make future git blame simpler.

@jeffwidman jeffwidman requested a review from a team as a code owner November 26, 2022 01:34
@jeffwidman jeffwidman enabled auto-merge (rebase) November 26, 2022 01:34
@jeffwidman
Copy link
Copy Markdown
Member Author

I'm actually a little surprised this was needed... not sure why it wasn't flagged when this warning was initially enabled as part of #5468. 🤔

@jeffwidman jeffwidman disabled auto-merge November 28, 2022 17:21
@jeffwidman
Copy link
Copy Markdown
Member Author

Ran this at the top-level and it flags this as well as a number of other issues, so the problem isn't specific to just this warning... I'll look into that in a separate PR:

[dependabot-core-dev] ~/dependabot-core $ rubocop
Inspecting 739 files
.C.............................................................................................................................................C.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................C.........C...................................................C...................................................

Offenses:

bin/dry-run.rb:128:1: C: [Correctable] Layout/EmptyLines: Extra blank line detected.
bin/dry-run.rb:129:3: C: [Correctable] Layout/IndentationConsistency: Inconsistent indentation detected.
  $options[:credentials] << { ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
bin/dry-run.rb:136:1: C: [Correctable] Layout/EmptyLines: Extra blank line detected.
common/dependabot-common.gemspec:20:32: C: Gemspec/RequiredRubyVersion: required_ruby_version and TargetRubyVersion (2.6, which may be specified in .rubocop.yml) should be equal.
  spec.required_ruby_version = ">= 3.1.0"
                               ^^^^^^^^^^
omnibus/dependabot-omnibus.gemspec:18:32: C: Gemspec/RequiredRubyVersion: required_ruby_version and TargetRubyVersion (2.6, which may be specified in .rubocop.yml) should be equal.
  spec.required_ruby_version = ">= 3.1.0"
                               ^^^^^^^^^^
pub/lib/dependabot/pub/requirement.rb:17:21: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      PATTERN_RAW = "\\s*(#{quoted})?\\s*(#{version_pattern})\\s*".freeze
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
python/spec/dependabot/python/file_parser/pyproject_files_parser_spec.rb:308:37: C: [Correctable] Style/NumericPredicate: Use be.positive? instead of be > 0.
      its(:length) { is_expected.to be > 0 }
                                    ^^^^^^

739 files inspected, 7 offenses detected, 5 offenses autocorrectable

Rubocop was complaining about this in an unrelated PR, so split it out to make future `git blame` simpler.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants